package com.pattern.adapter;

/*
TriangleAdapter is implementing RectInterface.
So, it needs to implement all the methods defined in the target interface.
*/
public class TriangleAdapter implements RectInterface {

    Triangle triangle;

    public TriangleAdapter(Triangle t) {
        this.triangle = t;
    }

    @Override
    public void aboutRectangle() {
        triangle.aboutTriangle();
    }

    @Override
    public double calculateAreaOfRectangle() {
        return triangle.calculateAreaOfTriangle();
    }


}
